Me   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 18
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A render 0 5 1
A componentDidMount 0 6 1
1
import React, { Component } from 'react';
2
3
class Me extends Component {
4
5
    constructor() {
6
        super();
7
        this.state = { data: "" };
8
    }
9
10
    componentDidMount() {
11
        fetch("https://me-api.listrom.me")
12
            .then(response => response.json())
13
            .then(data => {
14
                this.setState({ data: data.data.msg});
15
                // console.log(this.state.data);
16
            });
17
    };
18
19
    render() {
20
        return (
21
            <main dangerouslySetInnerHTML={{__html: this.state.data}} >
22
            </main>
23
        );
24
    }
25
}
26
27
export default Me;
28